package controller.admin;
import com.jfinal.aop.Inject;
import com.jfinal.kit.Kv;

import controller.admin.base.BaseAdminController;
import model.GasReplace;
import service.GasReplaceService;

public class AdminGasReplaceController extends BaseAdminController {
	@Inject GasReplaceService gasReplaceService ;

	public void info() {
		Long id = getParaToLong("id");
        set("data", GasReplace.dao.findById(id) );
        renderJson();
	}

	public void list() {
	    Kv kv = getParamKv() ;
	    Integer pageNumber = getParaToInt("pageNumber", 1);
	    Integer pageSize = getParaToInt("pageSize", 10);
	    set("page", gasReplaceService.getPage( kv , pageNumber, pageSize));
	    renderJson();
	}
}
